package com.meilai.project.controller.mini.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.meilai.project.dto.base.RangeObj;
import com.meilai.project.dto.business.intentionScheme.LocationInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author 张驰
 * @description 小程序-查询符合条件的项目-入参
 * @date 2022-08-31 09:16
 */
@Data
public class MiniSearchBuildingParams {
    @NotNull(message = "开始日期不能为空")
    @ApiModelProperty("开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate beginDate;

    @NotNull(message = "结束日期不能为空")
    @ApiModelProperty("结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @ApiModelProperty("行政区划List,传对应的adcode")
    private List<String> pcaList;

    @NotNull(message = "位置信息不能为空")
    @ApiModelProperty("位置信息")
    private LocationInfo positionLocation;

    @ApiModelProperty("位置半径,不指定传空")
    private Integer positionRadius;

    @ApiModelProperty("投放行业id")
    private Integer prohibitIndustryId;

    @ApiModelProperty("项目二级类型ids")
    private Set<Long> type2ndIds = new HashSet<>();

    @ApiModelProperty("项目价格区间")
    private List<RangeObj> priceRanges = new ArrayList<>();

    @ApiModelProperty("项目入住率区间")
    private List<RangeObj> checkInRateRanges = new ArrayList<>();

    @ApiModelProperty("项目交付年份区间")
    private List<RangeObj> yearRanges = new ArrayList<>();

    @ApiModelProperty("资源相关条件")
    private List<MiniSimpleObjForSourceDTO> sourceList;
}
